Skip to content

fix: two typos in predict_merges comparing wrong PageElement fields(#146)#152

Open
RayVR wants to merge 1 commit intodocling-project:mainfrom
RayVR:fix/predict-merges-page-no-typo
Open

fix: two typos in predict_merges comparing wrong PageElement fields(#146)#152
RayVR wants to merge 1 commit intodocling-project:mainfrom
RayVR:fix/predict-merges-page-no-typo

Conversation

@RayVR
Copy link
Copy Markdown

@RayVR RayVR commented Apr 1, 2026

Line 186: compared PageElement object to DocItemLabel enums instead of comparing .label, preventing the skip-loop from ever executing.

Line 200: compared page_no to .label instead of .page_no, making the cross-page check always true and bypassing the is_strictly_left_of guard.

Issue resolved by this Pull Request:
Resolves #146 #98

Checklist:

  • [-] Documentation has been updated, if necessary.
  • [-] Examples have been added, if necessary.
  • Tests have been added, if necessary.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

DCO Check Passed

Thanks @RayVR, all your commits are properly signed off. 🎉

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 1, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@RayVR RayVR force-pushed the fix/predict-merges-page-no-typo branch from 46093f4 to cb9af65 Compare April 1, 2026 03:11
(docling-project#146)

Line 186: compared PageElement object to DocItemLabel enums instead of
comparing .label, preventing the skip-loop from ever executing.

Line 200: compared page_no to .label instead of .page_no, making the
cross-page check always true and bypassing the is_strictly_left_of guard.

Signed-off-by: Raymond Roberts <[email protected]>
@RayVR RayVR force-pushed the fix/predict-merges-page-no-typo branch from cb9af65 to 1be2aca Compare April 1, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible bugs in ReadingOrderPredictor.predict_merges method

1 participant